<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    response.setHeader("Cache-Control", "no-store");
    response.setHeader("Pragrma", "no-cache");
    response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
    <script src="./static/js/jquery-1.12.4.js"></script>
    <script src="./static/js/jQueryRotate.js"></script>
    <title>图片原图</title>


</head>
<body>
<div style="margin-bottom: 200px;z-index: 999;">
    <center>
        <button type="button" id="r1">左转</button>
        <button type="button" id="r2">右转</button>
    </center>
</div>
<center><img src="#"></center>


</body>
</html>
<script>
    $(function () {
        var ContextPath = '<%=request.getContextPath()%>';
        $("img").attr("src", ContextPath + "/rs/Login/image/" + getQueryString("id"));


        var angle = 0;
        $("#r1").on("click", function () {
            angle -= 90;
            $("img").rotate(angle);
        });
        $("#r2").on("click", function () {
            angle += 90;
            $("img").rotate(angle);
        });


    });

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }
</script>